<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  User: Ivan wei
  --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>课程查询系统</title>
    <style>
        input{
            border: none;
            outline: none;
            background-color: transparent;
            width: 100%;
            height: 100%;
            text-align: center;
        }
        tr{
            height: 36px;
            text-align: center;
        }
        .sub{
            height: 36px;
        }
        .sub:hover{
            background-color: aqua;
        }
        a:link {color: blue; text-decoration:none;}
    </style>
</head>
<body>
<h1 style="text-align: center">广州现代教务系统管理</h1>
<div>
    <%@ include file="/common.jsp" %>
<div style="display: flex;flex-direction: column;align-items: center">
    <h2>班级管理</h2>
    <div style="width: 100% ;height: 45px;border: 1px;display: flex;align-items: center;justify-content: space-evenly;">
        <a href="/Administrator/classManager.do"> 班级显示</a>
        <a href="/Administrator/classManager/addClass.do"> 班级添加</a>
    </div>

    <table  style="min-width: 760px;background-color: rgb(235,242,241);" border="1">
        <tr>
            <th>班级编号</th>
            <th>班级名称</th>
            <th>修改 </th>
            <th>删除</th>
        </tr>
        <c:forEach var="Clazz" items="${findClass}">
            <form method="post" action="/Administrator/classManager/updateClass.do">
                <tr>
                    <td> <input type="text" name="id" value="<c:out value="${Clazz.id}"></c:out>" readonly></td>
                    <td> <input type="text" name="name" value="<c:out value="${Clazz.name}"></c:out>" readonly></td>
                    <td> <input class="sub" type="submit" value=" 更改班级名称" ></td>
                    <td> <input class="sub" type="submit" value="删除该班级" formaction="/Administrator/classManager/deleteClass.do"></td>
                </tr>
            </form>

        </c:forEach>
    </table>
</div>
        <H2 style="text-align: center">${err}</H2>
</body>
</html>
